import vue from 'vue'
import VueRouter from 'vue-router'
vue.use(VueRouter)








export default new VueRouter({
    mode: 'history',
    base: '/huhehaote/',
    routes: [
        {
            path: '',
             redirect: '/login'
        },
        {
            path: '/login',
            name: 'index',
            component: ()=> import('@/components/login')
        },
        {
            path: '/admin/:power',
            name: 'admin',
            component: ()=> import('@/components/nav/admin/main'),
            children: [
                {
                    path: ':value',
                    name: 'user-management',
                    component: ()=> import('@/components/container/user')
                },
                {
                    path: ':value',
                    name: 'diary-management',
                    component: ()=> import('@/components/container/diary')
                }
            ]
        },
        {
            path: '/staff/:power',
            name: 'staff',
            component: () => import('@/components/nav/staff/main'),
            children: [
                {
                    path: 'work',
                    name: 'work',
                    component: ()=> import('@/components/nav/staff/work'),

                    children: [
                        {
                            path: ':value',
                            name: 'library-examine',
                            component: ()=> import('@/components/container/library')
                        },
                        {
                            path: ':value',
                            name: 'report-examine',
                            component: ()=> import('@/components/container/report')
                        },
                        {
                            path: ':value',
                            name: 'library-three',
                            component: ()=> import('@/components/container/library')
                        },
                        {
                            path: ':value',
                            name: 'report-three',
                            component: ()=> import('@/components/container/report')
                        },
                        {
                            path: ':value',
                            name: 'library-five',
                            component: ()=> import('@/components/container/library')
                        },
                        {
                            path: ':value',
                            name: 'report-five',
                            component: ()=> import('@/components/container/report')
                        },
                        {
                            path: ':value',
                            name: 'sum-analysis',
                            component: ()=> import('@/components/container/sumanalysis')
                        },]
                },
                {
                    path: 'analysis',
                    name: 'analysis',
                    component: ()=> import('@/components/container/analysis')
                }
            ]

        },

    ]
})
